export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: '登录',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/home',
    name: '首页',
    layout: false,
    component: './home',
    hideInMenu: true,
  },
  {
    path: '/project',
    name: '项目管理',
    icon: 'setting',
    routes: [
      {
        path: '/project',
        redirect: '/project/list',
      },
      {
        path: '/project/list',
        name: '项目列表',
        component: './project/list',
      },
      {
        path: '/project/device',
        name: '设备列表',
        component: './project/device',
      },
      {
        path: '/project/line',
        name: '线路列表',
        component: './project/line',
      },
      {
        path: '/project/alarm',
        name: '预警列表',
        component: './project/alarm',
      },
    ],
  },
  {
    path: '/logs',
    name: '操作日志',
    icon: 'setting',
    component: './logs',
    hideInMenu: true,
  },
  {
    path: '/alarm',
    name: '告警',
    icon: 'setting',
    component: './alarm',
  },
  {
    path: '/inner',
    name: '设备概况',
    icon: 'setting',
    component: './TheLayout',
    flatMenu: true,
    routes: [
      {
        path: '/inner',
        redirect: '/inner/device',
      },
      {
        path: '/inner/device',
        name: '设备概况',
        icon: 'setting',
        component: './device',
      },
      {
        path: '/inner/safety',
        name: '安全监管',
        icon: 'setting',
        routes: [
          {
            path: '/inner/safety/all',
            name: '全部警报',
            icon: 'setting',
            component: './safety/all',
          },
          {
            path: '/inner/safety/electric',
            name: '漏电流',
            icon: 'setting',
            component: './safety/electric',
          },
          {
            path: '/inner/safety/temperature',
            name: '温度',
            icon: 'setting',
            component: './safety/temperature',
          },
          {
            path: '/inner/safety/leakageW',
            name: '漏电报警',
            icon: 'setting',
            component: './safety/leakageW',
          },
          {
            path: '/inner/safety/temperatureW',
            name: '温度报警',
            icon: 'setting',
            component: './safety/temperatureW',
          },
          {
            path: '/inner/safety/shortC',
            name: '漏保自检',
            icon: 'setting',
            component: './safety/shortC',
          },
          {
            path: '/inner/safety/shortW',
            name: '短路报警',
            icon: 'setting',
            component: './safety/shortW',
          },
          {
            path: '/inner/safety/OUvoltage',
            name: '过欠压',
            icon: 'setting',
            component: './safety/OUvoltage',
          },
          {
            path: '/inner/safety/overload',
            name: '过流过载',
            icon: 'setting',
            component: './safety/overload',
          },
          {
            path: '/inner/safety/sparkingW',
            name: '电弧报警',
            icon: 'setting',
            component: './safety/sparkingW',
          },
          {
            path: '/inner/safety/threephaseW',
            name: '三相报警',
            icon: 'setting',
            component: './safety/threephaseW',
          },
          {
            path: '/inner/safety/alarm',
            name: '异常状态',
            icon: 'setting',
            component: './safety/alarm',
          },
          {
            path: '/inner/safety/openCloseWarning',
            name: '分合闸警示',
            icon: 'setting',
            component: './safety/openCloseWarning',
          },
        ],
      },
    ],
  },
  {
    path: '/setting',
    name: '设置',
    icon: 'setting',
    component: './setting',
    hideInMenu: true,
  },
  {
    path: '/',
    redirect: '/home',
  },
  {
    component: './404',
  },
];
